﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _12._29._2014_IntroCSharp
{
    class Program
    {
        static void Main(string[] args)
        {
            List<TVRemote> remotes = new List<TVRemote>();

            //Instantiate a new SamsungRemote object and name it nicksRemote
            SamsungRemote nicksRemote = new SamsungRemote();
            nicksRemote.Color = "blue";
            nicksRemote.HasSmartHub = true;

            remotes.Add(nicksRemote);

            //Instantiate a new MemorexRemote object and name it jimsRemote
            MemorexRemote jimsRemote = new MemorexRemote();
            jimsRemote.Color = "red";

            remotes.Add(jimsRemote);

            foreach (TVRemote r in remotes)
            {
                Console.WriteLine("Color: " + r.Color);
                Console.WriteLine("Brand: " + r.Brand);
                Console.WriteLine(r.ChangeChannelUp());
                Console.WriteLine(r.ChangeChannelDown());

                if (r is SamsungRemote)
                {
                    SamsungRemote s = r as SamsungRemote;
                    Console.WriteLine("Smart Hub Support: " + s.HasSmartHub);
                }
                
                Console.WriteLine();
            }

            Console.ReadLine();
        }
    }
}
